home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk52 / tutor / c3 < prev    next >
Text File  |  1995-03-18  |  10KB  |  325 lines

  1. Commands in this file:
  2. ADDBUFFERS
  3. DATE
  4. NEWCLI
  5. ENDCLI
  6. FILENOTE
  7. LIST
  8. INSTALL
  9. JOIN
  10. STACK
  11. SORT
  12. LOADWB
  13. MOUNT
  14. PROMPT
  15.  
  16. ________________________________________________________________________________
  17.  
  18. ADDBUFFERS
  19.  
  20.     adds buffers to reduce disk access time.
  21.  
  22.     The syntax is:
  23.  
  24. BS> ADDBUFFERS df?: num
  25.  
  26.     Each buffer you add, the number "num", reduces available memory by about
  27. 500 bytes and the affect decreases if you add more than about 30.
  28.  
  29.     It is suggested that you start with 25 per drive.
  30. ________________________________________________________________________________
  31.  
  32. DATE
  33.  
  34.     allows the internal clock to be updated to real world time.
  35.  
  36. >> DATE
  37. /* current internal time */
  38.  
  39.     If your fortunate enough to have a battery-powered clock in your
  40. system, you don't really need this command. But, if you don't, the following
  41. sequence will A) tell you what time is currently set, B) ask you to input
  42. the time, C) write the time to the disk from where it will be used the
  43. next time you boot-up. The best place for these lines is toward the end of
  44. your startup-sequence. The reason being, if you type the date in wrong, the
  45. sequence will abort, if this is the last thing before LOADWB and ENDCLI, for
  46. instance, you can enter those commands yourself and you won't have to reboot.
  47. This wouldn't happen if you could type...I can't. /* One way around this aborted
  48. sequence business is to use the FAILAT command. We haven't covered it yet, but
  49. through it you can keep a batchfile from aborting if a specific command in it
  50. fails. */
  51.  
  52.     DATE
  53.     DATE ?
  54.     DATE >s:now
  55.  
  56.  
  57. ________________________________________________________________________________
  58.  
  59. NEWCLI  ENDCLI
  60.  
  61.     opens/closes a CLI window
  62.  
  63.     You can use this for various things that you know will tie up your
  64. window for an extended period. For instance, copying a file to the printer.
  65.  
  66.     A NEWCLI can be opened to a pre-determined size. The numbers you
  67. supply are the: X-coordinate of the upper left corner/Y-coordinate of the
  68. upper left corner/distance along the X-axis/distance along the Y-axis/title.
  69. More simply put they are...con:x/y/width/height/title. If you don't
  70. wish to have a title, it's not required, but the "/" after the height IS!!
  71.  
  72. >> NEWCLI con:100/100/350/100/Sample_Window
  73.  
  74.     Click in Sample_window and type:
  75.  
  76. >> ENDCLI
  77.  
  78.     Another function of a NEWCLI is to have it EXECUTE a batchfile when
  79. it's opened.
  80.  
  81. >> NEWCLI con:100/100/350/100/ s:Sample_Batch
  82.  
  83.         Click in the new window /* notice: no title */ and type:
  84.  
  85. >> ENDCLI
  86.  
  87.     If you have RUN a command from a CLI and then try to ENDCLI that window,
  88. the window won't close until the background tasks are finished. Let's use ED
  89. as a window holder again.
  90.  
  91. >> NEWCLI
  92.  
  93.     Now click in THAT window and:
  94.  
  95. >> ED ram:foo
  96. /* you might have to move things around a little to continue to type into
  97.    the same window */
  98. >> ENDCLI
  99. /* the window doesn't go away */
  100.  
  101.     Now click in ED and:
  102. <ESC>
  103. * Q
  104.  
  105.     Now when the ED window disappears, so does the NEWCLI window you
  106. started.
  107.  
  108. ________________________________________________________________________________
  109.  
  110. FILENOTE
  111.  
  112.     attaches a comment, descriptive or otherwise, to a file.
  113.  
  114.     The syntax is: 
  115.       FILENOTE FILE/A, COMMENT/A
  116.  
  117. if you don't use spaces in your comment, the quotes aren't necessary.
  118.  
  119. >> FILENOTE examples/text comment /* use whatever COMMENT you want */
  120.  
  121.     Keep in mind that you don't have to use the word COMMENT in your
  122. command line but a "comment" is required.
  123.  
  124.     I suppose you're going to ask how to see these comments now?!?
  125.  
  126. ________________________________________________________________________________
  127.  
  128. LIST
  129.  
  130.     examines and lists specified data about a file or directory
  131.  
  132. >> LIST examples
  133. Directory "examples" on /* date */
  134. First                        Dir rwed 21-Apr-88 /* time */
  135. text                          33 rwed Today     /* time */
  136. :/* your comment will be here */
  137. 1 files - 1 directories - 3 blocks - 33 bytes
  138.  
  139.     You'll notice that both subdirectories and files are listed. If it's
  140. a file the next column is it's size. Then it's protection status, and the date
  141. and time last changed.
  142.  
  143.     There are several options that we don't need to get into, but if
  144. your curious:
  145.  
  146. >> LIST ?
  147. DIR,P=PAT/K,DATES/S,KEYS/S,NODATES/S,S/K,SINCE/K,SORT/S,TO/K,UPTO/K,QUICK/S:
  148.  
  149. and type one in at the colon at the end of the line, remembering how the 
  150. "/letter" business works. If you don't remember, refer to the 
  151.             CLI_tutorial.intro
  152. file.
  153. ________________________________________________________________________________
  154.  
  155. INSTALL
  156.  
  157.     makes a disk "bootable"
  158.  
  159.     This command writes the information to a disk that allows it to be
  160. accepted at the hand-picture WB prompt. If you do this to an empty, formatted
  161. disk, you won't get much, but it will be accepted.
  162.  
  163.     This is also the command that's used to "kill viruses". Should your
  164. disks become infected, the virus will live in the "bootblock" of a disk until
  165. discovered and the disk is INSTALLed.
  166.  
  167. ________________________________________________________________________________
  168.  
  169. JOIN
  170.  
  171.     can append up to 15 files and make one.
  172.  
  173.     These files are added together one after another. After the list of
  174. files you want to JOIN, use the keyword AS and enter the destination_filename.
  175.  
  176. >> COPY examples/text ram:
  177. >> COPY examples/text ram:text2
  178. >> COPY examples/text ram:text3
  179. >> CD ram:
  180. >> JOIN text text2 text3 AS new
  181. >> TYPE new
  182.  
  183. /* Not too imaginative, but gives you a feel for the thing */
  184.  
  185. ________________________________________________________________________________
  186.  
  187. STACK
  188.  
  189.     can change the stack allowed for the execution of commands.
  190.  
  191.     Whenever a program is run it requires and utilizes an amount of
  192. memory for the record-keeping that goes on in the program. This memory
  193. is called the "stack".
  194.  
  195. >> STACK
  196. current stack size is 4000 bytes
  197.  
  198.     4000 is the default stack size for a CLI. Some commands and programs
  199. require a greater stack though. As it says in the AmigaDOS manual:
  200.     "WARNING: The only indication that you have run out of stack is that
  201. the Amiga crashes! If you are not sure, it is better to overestimate the
  202. amount you need."
  203.  
  204.     Don't panic, as a general rule, you won't need to worry about it. But
  205. just for practice:
  206.  
  207. >> STACK 8000
  208. >> STACK
  209. current stack size is 8000 bytes
  210. ________________________________________________________________________________
  211.  
  212. SORT
  213.  
  214.     is a limited text sorter.
  215.  
  216.     SORT requires that you tell it either FROM filename or TO filename,
  217. and will alphabetically rummage through and give you the results.
  218.     It's only option is COLSTART /* for which column to start in */.
  219.  
  220.     Another warning, this is one of the only commands that really has the
  221. potential to run over stack size if you're doing large files.
  222.  
  223. >> CD
  224. ram:    /* just checking */
  225. >> SORT new TO new2
  226. >> TYPE new2
  227. /* should be a file with three of each line */
  228. >> SORT new TO new3 COLSTART 2
  229. >> TYPE new3
  230. /* this time the SECOND letter in each line will be in order */
  231.  
  232.     This can be handy if you have two similar lists and aren't sure
  233. what's common to both lists. By going through the steps we just went through
  234. starting with JOIN, and then EDiting the result of the sort, duplicates will
  235. appear twice, of course, and on adjacent lines.
  236. ________________________________________________________________________________
  237.  
  238. /* time out for a ram: clean-up */
  239.  
  240. >> DELETE ram:#?
  241.  
  242. /* the "#" is a wildcard that matches any single character and the "?" will
  243. match 0 or more repetitions of it. this method shouldn't touch C: because
  244. you can only DELETE a directory if it's empty */
  245.  
  246. ________________________________________________________________________________
  247.  
  248. LOADWB
  249.  
  250.     creates the workbench screen.
  251.  
  252.     This command is usually only found in the startup-sequence, since
  253. it only is run once until you reboot. However, if the startup-sequence
  254. aborts for some reason, if you have your startup-sequence set-up to end in a
  255. CLI, or if you interrupt it with <CTRL>D for reasons known only to you, you
  256. might want to LOADWB at some point.
  257.  
  258. ________________________________________________________________________________
  259.  
  260. MOUNT
  261.  
  262.     make a device that doesn't autoconfigure available
  263.  
  264.     MOUNT directs AmigaDOS to the devs:mountlist, where it needs to find a
  265. specification list for the device you have told it to MOUNT. You generally
  266. won't be required to do this, but sometimes you'll run across a software
  267. "device" that has to be handled this way.
  268.  
  269. >> TYPE devs:mountlist
  270.  
  271.     One example of a software device is the ASDG recoverable ram disk.
  272. I've included a copy of my mountlist so that you can compare.
  273.  
  274. >> TYPE devs:mountlist_2
  275. /* the listing that has VD0: on the left side of the top line is the
  276. specification for the recoverable ram disk. Don't worry if it doesn't make
  277. much sense */
  278.  
  279.     To be able to utilize this "device", I have a line, in my startup-
  280. sequence that says:
  281.  
  282.             MOUNT VD0:
  283.  
  284.     /* I can see your wheels turning, you won't be able to do this at
  285. the present time since you don't have the other files necessary to make
  286. VD0: work....but nice try! */
  287.  
  288. ________________________________________________________________________________
  289.  
  290. PROMPT
  291.  
  292.     allows you to redefine the prompt that appears in your CLI windows.
  293.  
  294.     The syntax is similar to ECHO, but quotes aren't required unless
  295. you want a space to appear as part of your prompt.
  296.     Prompts can be virtually any character string you want.
  297.  
  298. >> PROMPT "OK, what do you want now? > "
  299.  
  300.     Just a few handy comments. First, notice the <SPACE> between the ">"
  301. and the final ". Try typing in the same line but without the <SPACE> and notice
  302. what happens to the cursor position. It makes no difference, just personal
  303. preference. The same sort of thing happens if the FIRST character within the
  304. quotes is a <SPACE>.
  305.  
  306.     If you want your prompt to display the CLI task number associated with
  307. that window, you'd put "%N" in the string somewhere.
  308.  
  309. >> PROMPT "%N> "
  310.  /* That's the original prompt */
  311.  
  312.     Typing in PROMPT with no argument gives you a single ">". /* unless
  313. your using the ARP /* AmigaDOS Replacement Project */ commands, which I doubt.
  314. The ARP commands default to "current directory>".
  315.  
  316. ________________________________________________________________________________
  317.  
  318.  
  319.     That'll about do it for this file. By now you should be learning the
  320. drill. But, if you've forgotten:
  321.  
  322.         READER CLI_tutorial.4
  323.  
  324. is next.
  325.